import 'package:flutter/material.dart';

class ScrollView_Widget extends StatefulWidget {
  const ScrollView_Widget({Key? key}) : super(key: key);

  @override
  _ScrollView_WidgetState createState() => _ScrollView_WidgetState();
}

class _ScrollView_WidgetState extends State<ScrollView_Widget> {
  String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Flutter中的Scrollview"),
      ),
      body: SingleChildScrollView(
        child: Center(
          child: Column(
            children: str
                .split("")
                .map((e) => Text(e.toString(),
                style: TextStyle(fontWeight: FontWeight.bold, fontSize: 40)))
                .toList(),
            // children: str
            //     .split("")
            //     .map((e) {
            //          return Text(e.toString(),
            //               style: TextStyle(
            //                   fontWeight: FontWeight.bold, fontSize: 20));
            //         })
            //     .toList(),
          ),
        ),
      ),
    );
  }
}
